package com.ultrasoft.farmasoft.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.ultrasoft.farmasoft.domain.Access;
import com.ultrasoft.farmasoft.domain.Defaultaccess;
import com.ultrasoft.farmasoft.domain.Menu;
import com.ultrasoft.farmasoft.domain.Option;
import com.ultrasoft.farmasoft.domain.Pharmacy;
import com.ultrasoft.farmasoft.domain.Rol;
import com.ultrasoft.farmasoft.domain.Submenu;
import com.ultrasoft.farmasoft.domain.User;
import com.ultrasoft.farmasoft.domain.Userpharmacy;

public interface HumanResourcesService {
	
	public List<Menu> getMenuList();
	
	
	public List<Access> getAccessList();
	public List<Access> getAccessListByPharmacyId(Integer pharmacyId);
	public List<Access> getAccessList(Integer userId);
	public List<Access> getAccessList(Integer userId,Integer pharmacyId);
	public List<Access> getAccessList(Integer userId,Integer pharmacyId, short menuId,	short submenuId);
	public Access searchAccessByPharmacyIdByUserIdByMenuIdBySubmenuIdByOptionId(Integer pharmacyId,Integer userId,short menuId, short submenuId, short optionId);
	public void removeAccess(Access access);
	public void removeAccessByUserByPharmacyId(Integer userId,Integer pharmacyId);
	
		
	public List<Defaultaccess> getDefaultAccessList();
	public List<Defaultaccess> getDefaultAccessList(Integer rolId);
	public List<Defaultaccess> getDefaultAccessList(Integer rolId,short menuId, short submenuId);
    public Defaultaccess searchDefaultAccessByRolIdByMenuIdBySubMenuIdByOptionId(Integer rolId,short menuId, short submenuId,short optionId);    
	
	
    public List<Option> getOptionList();
	public List<Option> getOptionList(short menuId);
	public List<Option> getOptionList(short menuId,short submenuId);
    public Option searchOptionByMenuIdBySubmenuIdByOptionId(short menuId, short submenuId,short optionId);      
    public void addOption(Option option);
    
    
    public List<Pharmacy> getListPharmacy();
    public Pharmacy searchPharmacyByPharmacyId(Integer pharmacyId);
    public void updatePharmacy(Pharmacy pharmacy); 
    public void removePharmacy(Pharmacy pharmacy);    
    public void addPharmacy(Pharmacy pharmacy);
    
    
    public List<Rol> getRolList();
    public Rol searchRolByRolId(Short idRol);
    
    
    public List<Submenu> getSubMenuList();
	public List<Submenu> getSubMenuList(short menuId);
    public Submenu searchSubMenuByMenuIdBySubmenuId(short menuId, short submenuId);      
    
    
	public List<User> getUserList();
	public List<User> getUserList(Integer rolId);
	public List<User> getUserListExcept(Integer userId);
	public List<User> getUserList(String login);
    public User searchUserByUserId(Integer userId);
    public User searchUserByLoginByPassword(String login, String password);
    public void updateUser(User user); 
    public void removeUser(User user);    
    public void addUser(User user);   
	
    
    public List<Userpharmacy> getUserPharmacyList();
	public List<Userpharmacy> getUserPharmacyList(boolean active);
	public List<Userpharmacy> getUserPharmacyList(Integer userId);
	public List<Userpharmacy> getUserPharmacyList(Integer userId,boolean active);
	public List<Userpharmacy> getListUserPharmacy(String login, String password);
	public List<Userpharmacy> getListUserPharmacy(Integer pharmacyId,boolean active);
	public Userpharmacy searchUserPharmacyByPharmacyIdByUserId(Integer pharmacyId,Integer userId);
    public void updateUserPharmacy(Userpharmacy userPharmacy);
	public void addUserPharmacy(Userpharmacy userPharmacy);
	
	// extras
   	public List<Menu> getMenuListWithSubmenuAndOptions();
   	public void addAccessByRequestByUserPharmacy(HttpServletRequest request,Userpharmacy userPharmacy);
}
